#!/bin/sh

MYDIR=/data4/li/libing/surendra
DDIR=/data4/bsi/bioinf_ext1/s113890.senescence
OUTPUT=$MYDIR/data

mkdir -p $MYDIR/jobs

idx=1
for sdir in `cat $DDIR/path.txt`;do
		jobidx=$((idx++))
		cat > $MYDIR/jobs/sge.$jobidx <<EOF
	
#!/bin/bash

#$ -q 1-day
#$ -l h_vmem=5G
#$ -M wang.libing@mayo.edu
#$ -m abe
#$ -cwd

echo "executing on \$HOSTNAME"

/usr/bin/perl /data4/bsi/bioinf_int/s106381.borawork/naresh_scripts/SVN/HGUPLUS2_GeneSumm_batch_V1/bin/batch_normalized_frma_convertedCEL2.pl -i $sdir/rawdata/ -o $sdir/output/ -d $sdir/temp/

EOF
	chmod +x $MYDIR/jobs/sge.$jobidx
done
